import axios from '@/api'

class MonitorServices {
  constructor() { }

  /**
   * 获取登录用户列表
   *
   * @param {{
   *     user_id: string;
   *     usr_act: string;
   *     usr_nickname: string;
   *   }} data
   * @returns
   * @memberof MointorServices
   */
  getLoginList(data: {
    user_id: string;
    usr_act: string;
    usr_nickname: string;
  } & Api.PageOptions) {
    return axios.post<unknown, Api.ResponseOptions>('/btsys/monitor/login-list', data)
  }

  /**
   * 获取登录用户明细表
   *
   * @param {({
   *     user_id: string;
   *     usr_act: string;
   *     usr_nickname: string;
   *   } & Api.PageOptions)} data
   * @returns
   * @memberof MonitorServices
   */
  getLoginDetails(data: {
    user_id: string;
    usr_act: string;
    usr_nickname: string;
  } & Api.PageOptions) {
    return axios.post<unknown, Api.ResponseOptions>('/btsys/monitor/login-logs', data)
  }

  /**
   * 获取登录日志列表
   *
   * @param {({
   *     user_id: string;
   *     usr_act: string;
   *     usr_nickname: string;
   *   } & Api.PageOptions)} data
   * @returns
   * @memberof MonitorServices
   */
  getLoginLogList(data: {
    user_id: string;
    usr_act: string;
    usr_nickname: string;
  } & Api.PageOptions) {
    return axios.post<unknown, Api.ResponseOptions>('/btsys/monitor/login-log', data)
  }

  /**
   * 获取上传execl记录
   *
   * @param {({
   *     year: string;
   *     type: string;
   *   } & Api.PageOptions)} data
   * @returns
   * @memberof MointorServices
   */
  getUploadList(data: {
    year: string;
    type: string;
  } & Api.PageOptions) {
    return axios.post<unknown, Api.ResponseOptions>('/btsys/monitor/upload-list', data)
  }

}

export const monitorServices = new MonitorServices()

export default MonitorServices